import request from '@/utils/request'

// 查询工单信息报工列表
export function listWorkreport(query) {
  return request({
    url: '/prodmanage/workreport/list',
    method: 'get',
    params: query
  })
}

// 查询工单信息报工详细
export function getWorkreport(workorderId) {
  return request({
    url: '/prodmanage/workreport/' + workorderId,
    method: 'get'
  })
}

// 新增工单信息报工
export function addWorkreport(data) {
  return request({
    url: '/prodmanage/workreport',
    method: 'post',
    data: data
  })
}

// 修改工单信息报工
export function updateWorkreport(data) {
  return request({
    url: '/prodmanage/workreport',
    method: 'put',
    data: data
  })
}

// 删除工单信息报工
export function delWorkreport(workorderId) {
  return request({
    url: '/prodmanage/workreport/' + workorderId,
    method: 'delete'
  })
}

// 导出工单信息报工
export function exportWorkreport(query) {
  return request({
    url: '/prodmanage/workreport/export',
    method: 'get',
    params: query
  })
}

// 报工
export function addReport(data) {
  return request({
    url: '/prodmanage/workreport/report',
    method: 'post',
    data: data
  })
}

// 首检
export function addFcheck(data) {
  return request({
    url: '/prodmanage/workreport/fcheck',
    method: 'post',
    data: data
  })
}